package ch.sv7.tool.codec;

import junit.framework.TestCase;

/**
 * TODO: Document me!
 *
 * @author svt
 *
 */
public class CodecsTestCase extends TestCase {

	public void testEncodeDecode() throws Exception {
		
		String myData = "ajklsdfho8790782089345";
		String encoded = Codecs.base64Encode(myData);
		assertNotSame(myData, encoded);
		String decoded = Codecs.base64Decode(encoded);
		assertEquals(myData, decoded);
		
	}
	public void testNull() throws Exception {
		
		assertNull(Codecs.base64Encode((String)null));
		assertNull(Codecs.base64Decode((String)null));

		assertNull(Codecs.base64Encode((byte[])null));
		assertNull(Codecs.base64Decode((byte[])null));

		
	}
}
